package com.k.sshm.boot.web.servlet.container.control;

import com.k.sshm.boot.web.servlet.container.model.ModelMV;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/handling")
public class HandlingControl {

    @PostMapping(value = "/redirect")
    public String redirect(@RequestBody ModelMV obj) {
        return "redirect:/myapp/some/resource";
    }

    @PostMapping(value = "/forward")
    public String forward(@RequestBody ModelMV obj) {
        return "forward:/index.action";
    }
}
